/**
 * @file       PagingByPanelStrategy.h
 * @brief      To  go paging According to the size of the panel
 * @author     Huabo Zheng
 * @date       Jan 31, 2012
 * @Copyright  2012, www.netgear.com Inc. All rights reserved.
 */

#ifndef PAGINGBYPANELSTRATEGY_H_
#define PAGINGBYPANELSTRATEGY_H_

#include "PagingStrategy.h"
#include "Frame.h"

namespace NS_LCD_AFW
{

/**
 *@class  CPagingByPanelStrategy
 *@brief  To  go paging According to the size of the panel
 */
class CPagingByPanelStrategy: public NS_LCD_AFW::CPagingStrategy
{
public:

	/**
	 *@brief Constructor
	 */
	CPagingByPanelStrategy();

	/**
	*@brief DeConstructor
	*/
	virtual ~CPagingByPanelStrategy();
public:


	/**
	 *@brief  Calculate the view port
	 *@details    Calculate the view port
	 *@param[in]  framePtrArray A array object that pointer to CFrame pointer object
	 *@param[in]  parentRect    The Rect of parent frame object
	 *@param[in]  pageResult    initial paging information
	 *@param[out] pageResult    Paging result
	 *@exception none
	 *@retval    int
	 *@return    ERR_SUCCESS if success,otherwise failure
	 *@note
	 *@attention
	*/
	virtual int calculateViewPort(const CFramePtrArray &framePtrArray,
			const CRect &parentRect, CPageInfo &pageResult);
};

} /* namespace NS_LCD_AFW */
#endif /* PAGINGBYPANELSTRATEGY_H_ */
